<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //async函数
            async function main(){
                //return 322;
                /* return new Promise((resolve,reject)=>{
                    resolve('asd');
                }); */
                /* throw 'err'; */
                let p=new Promise((resolve,reject)=>{
                    reject('asd');
                });
                /* let res=await p; */
                /* let res=await 30; */
                try {
                    let res=await p;
                } catch (e) {
                    console.log(e);
                }
                console.log(res);
            }
            main();
            /* let result=main();
            console.log(result); */
        </script>
</body>
</html>